package com.power.sifa.respond.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.stereotype.Component;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  行政应诉申请实体类
*/

@Entity
@ApiModel(value="行政应诉申请")
@Data
@Table(name="Apl_respond",schema="sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Component
//@IdClass(Apl_respond.Apl_respondPK.class) 用于复合组件
public class Apl_respond extends BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "序号applyid")
    private String id;

    @ApiModelProperty(value = "案件类型")
    private Integer casetype;

    @ApiModelProperty(value = "审结状态")
    private Integer casestatus;

    @ApiModelProperty(value = "一审原审案件编号")
    private String firstcode;

    @ApiModelProperty(value = "是否经过复议")
    private Integer isrecon;

    @ApiModelProperty(value = "复议案件编号")
    private String reconcode;

    @ApiModelProperty(value = "复议申请人")
    private String applyname;

    @ApiModelProperty(value = "复议被申请人")
    private String targetname;

    @ApiModelProperty(value = "复议事项")
    private Integer prtype;

    @ApiModelProperty(value = "关联信息行政管理类别")
    private String asmgrcate;

    @ApiModelProperty(value = "复议请求")
    private Integer prrequest;

    @ApiModelProperty(value = "复议决定")
    private Integer decisiontype;

    @ApiModelProperty(value = "收到应诉通知书申请日期")
    private String noticedate;

    @ApiModelProperty(value = "诉讼请求")
    private Integer requestre;

    @ApiModelProperty(value = "起诉事项")
    private Integer suetype;

    @ApiModelProperty(value = "应诉信息行政管理类别")
    private String remgrcate;

    @ApiModelProperty(value = "是否收到司法建议")
    private Integer isreceive;

    @ApiModelProperty(value = "是否落实司法建议")
    private Integer isfulfill;

    @ApiModelProperty(value = "是否附带对规范性文件审查")
    private Integer isdocreview;

    @ApiModelProperty(value = "原告")
    private String plaintiffname;

    @ApiModelProperty(value = "是否存在第三人")
    private Integer isthird;

    @ApiModelProperty(value = "机关应诉类型")
    private Integer organtype;

    @ApiModelProperty(value = "立案日期")
    private String regisdate;

    @ApiModelProperty(value = "结案日期")
    private String closedate;

    @ApiModelProperty(value = "文件名称")
    private String filename;

    @ApiModelProperty(value = "制定机关")
    private String fororgan;

    @ApiModelProperty(value = "审查机关")
    private String exaorgan;

    @ApiModelProperty(value = "审查结果")
    private String exaresult;

    @ApiModelProperty(value = "不合法原因")
    private String reason;

    @ApiModelProperty(value = "不合法条款处理结果")
    private Integer proresult;

    @ApiModelProperty(value = "不合法原因说明")
    private String illustrate;

    @ApiModelProperty(value = "其它诉讼请求")
    private String otherreq;

    /**
     * 行政复议录入人
     */
    @Transient
    private String regusername;

    /**
     * 行政复议录入人id
     */
    @Transient
    private String reguserid;

    /**
     *  行政复议创建时间
     */
    @Transient
    private String createtime;

    /**
     *  案件号
     */
    @Transient
    private String acceptcode;

    /**
     *  applyid
     */
    @Transient
    private String applyid;

    /**
     *  行政管理类别
     */
    @Transient
    private String mgrcate;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("casetype", this.getCasetype());
        map.put("casestatus", this.getCasestatus());
        map.put("firstcode", this.getFirstcode());
        map.put("isrecon", this.getIsrecon());
        map.put("reconcode", this.getReconcode());
        map.put("applyname", this.getApplyname());
        map.put("targetname", this.getTargetname());
        map.put("prtype", this.getPrtype());
        map.put("asmgrcate", this.getAsmgrcate());
        map.put("prrequest", this.getPrrequest());
        map.put("decisiontype", this.getDecisiontype());
        map.put("noticedate", this.getNoticedate());
        map.put("requestre", this.getRequestre());
        map.put("suetype", this.getSuetype());
        map.put("remgrcate", this.getRemgrcate());
        map.put("isreceive", this.getIsreceive());
        map.put("isfulfill", this.getIsfulfill());
        map.put("isdocreview", this.getIsdocreview());
        map.put("plaintiffname", this.getPlaintiffname());
        map.put("isthird", this.getIsthird());
        map.put("organtype", this.getOrgantype());
        map.put("regisdate", this.getRegisdate());
        map.put("closedate", this.getClosedate());
        map.put("filename", this.getFilename());
        map.put("fororgan", this.getFororgan());
        map.put("exaorgan", this.getExaorgan());
        map.put("exaresult", this.getExaresult());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Apl_respondPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Apl_respondPK pk = (Apl_respondPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
